function [ num ] = Cap_statistics( cap_trees )
%CAP_STATISTICS Summary of this function goes here
%   Detailed explanation goes here
num=0;
for i=1:length(cap_trees)
    for j=1:cap_trees(i).segments_num
        if all(cap_trees(i).segments(j).start<500) && all(cap_trees(i).segments(j).start>0)
            %if all(cap_trees(i).segments(j).end<500) && all(cap_trees(i).segments(j).end>0)
                num=num+1;
            %end            
        end        
    end
end

end

